﻿/*
 *
 * @author
 * @version
 */
 import com.dinmax.flash.utilities.array.ArrayUtils;
 import com.dinmax.flash.central.extension.user.Address;
 
 class com.dinmax.flash.central.extension.user.Person {
	
	private var id:Number;
	private var name:String;
	private var lastName:String;
	private var nick:String;
	private var phone:Number;
	private var email:String;
	private var addresses:Array; // de address
	
	public function setId (newId:Number):Void {
		id = newId;
		return;
	}
	
	public function getId ():Number {
		return id;
	}
	
	public function setName (newName:String):Void {
		name = newName;
		return;
	}
	
	public function getName ():String {
		return name;
	}
	
	public function setLastName (newLastname:String):Void {
		lastName = newLastname;
		return;
	}
	
	public function getLastName ():String {
		return lastName;
	}
	
	public function setNick (newNick:String):Void {
		nick = newNick;
		return;
	}
	
	public function getNick ():String {
		return nick;
	}
	
	public function setPhone (newPhone:Number):Void {
		//trace("Person.as setPhone() "+newPhone);
		phone = newPhone;
		return;
	}
	
	public function getPhone ():Number {
		return phone;
	}
	
	public function setEmail (newMail:String):Void {
		email = newMail;
		return;
	}
	
	public function getEmail ():String {
		return email;
	}
	
	public function addAddress(address:Address):Void {
		addresses.push(ArrayUtils.removeItem(addresses, address));
		return;
	};
	
	public function setAddresses (newAddresses:Array):Void {
		addresses = newAddresses;
		return;
	};
	
	public function getAddresses ():Array {
		return addresses;
	}
	
}; // fin de clase